* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Microsoft YaHei', sans-serif;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    background: #1a1a2e;
    overflow: hidden;
}

/* 星空背景 */
.stars {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #000 url('../images/stars.png') repeat;
    z-index: -2;
}

.twinkling {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: transparent url('../images/twinkling.png') repeat;
    z-index: -1;
    animation: twinkle 200s linear infinite;
}

@keyframes twinkle {
    from {background-position: 0 0;}
    to {background-position: -10000px 5000px;}
}

.container {
    width: 100%;
    height: 100vh;
    display: flex;
    padding: 2rem;
    position: relative;
    z-index: 1;
    gap: 2rem;
}

.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.header {
    text-align: center;
    margin-bottom: 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 2rem;
}

.title {
    color: #fff;
    font-size: 2.8em;
    margin-bottom: 0.5rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
    animation: float 3s ease-in-out infinite;
    flex: 1;
    text-align: center;
}

.subtitle {
    color: #fff;
    font-size: 1.2em;
    opacity: 0.9;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.2);
}

/* 抽奖区域样式 */
.lottery-stage {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 160px;
    margin-bottom: 1rem;
    perspective: 1000px;
}

.lottery-box {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 1rem;
    width: fit-content;
    margin: 0 auto;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

.slot-machine {
    position: relative;
    min-height: 140px;
    overflow: hidden;
    border-radius: 15px;
    background: rgba(0, 0, 0, 0.2);
    box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.3);
    display: flex;
    justify-content: center;
    align-items: center;
}

.slot-window {
    width: 100%;
    min-height: 140px;
    overflow: hidden;
    position: relative;
    border-radius: 15px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.slot-wrapper {
    position: relative;
    display: flex;
    flex-wrap: nowrap;
    justify-content: center;
    align-items: center;
    gap: 20px;
    padding: 20px;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    width: fit-content;
    margin: 0 auto;
}

.slot-item {
    flex: 0 0 auto;
    width: 140px;
    height: 180px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 12px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(5px);
    border-radius: 15px;
    transition: all 0.3s ease;
    transform-origin: center center;
    border: 1px solid rgba(255, 255, 255, 0.2);
    perspective: 1000px;
}

.avatar {
    position: relative;
    width: 90px;
    height: 90px;
    border-radius: 50%;
    margin: 0 auto;
    transform-style: preserve-3d;
    transition: transform 0.6s;
}

.avatar-front,
.avatar-back {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    backface-visibility: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2em;
    color: white;
    background: linear-gradient(45deg, #FF6B6B, #FF8E53);
    box-shadow: 0 8px 25px rgba(0,0,0,0.2);
    border: 3px solid rgba(255, 255, 255, 0.3);
}

.avatar-back {
    transform: rotateY(180deg);
    background: linear-gradient(45deg, #FF8E53, #FF6B6B);
}

.winner .avatar {
    animation: continuous-flip 3s linear infinite;
}

@keyframes continuous-flip {
    0% {
        transform: rotateY(0);
    }
    100% {
        transform: rotateY(360deg);
    }
}

.placeholder-item .avatar-front,
.placeholder-item .avatar-back {
    background: linear-gradient(45deg, #666, #999);
    border: 2px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.slot-item .name {
    font-size: 1.4em;
    color: #fff;
    font-weight: bold;
    text-shadow: 0 2px 5px rgba(0,0,0,0.2);
    margin-top: 8px;
}

.slot-item:hover .avatar {
    transform: perspective(400px) rotateY(180deg);
}

/* 控制面板样式 */
.control-panel {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
    margin: 2rem 0;
}

.roll-btn {
    background: linear-gradient(45deg, #FF6B6B, #FF8E53);
    border: none;
    padding: 0;
    cursor: pointer;
    width: auto;
    height: auto;
    position: relative;
    border-radius: 50px;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 10px 20px rgba(255, 107, 107, 0.3);
}

.roll-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 30px rgba(255, 107, 107, 0.4);
}

.roll-btn:active {
    transform: translateY(1px);
    box-shadow: 0 5px 15px rgba(255, 107, 107, 0.4);
}

.roll-btn-content {
    display: flex;
    align-items: center;
    padding: 15px 40px;
    gap: 12px;
    color: white;
    position: relative;
    z-index: 1;
}

.btn-icon {
    font-size: 1.4em;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.btn-text {
    font-size: 1.2em;
    font-weight: 600;
    letter-spacing: 1px;
    transition: all 0.3s ease;
}

.btn-ripple {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, rgba(255,255,255,0.2), rgba(255,255,255,0));
    transform: translateX(-100%);
    transition: transform 0.6s ease;
}

.roll-btn:hover .btn-ripple {
    transform: translateX(100%);
}

.roll-btn.rolling {
    background: linear-gradient(45deg, #4CAF50, #45a049);
    animation: pulse 1.5s infinite;
}

.roll-btn.rolling .btn-icon {
    animation: spin 1.5s linear infinite;
}

.roll-btn.rolling .btn-text {
    opacity: 0.9;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(76, 175, 80, 0.4);
    }
    70% {
        box-shadow: 0 0 0 15px rgba(76, 175, 80, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(76, 175, 80, 0);
    }
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

.number-selector {
    width: 80px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    background: rgba(255, 255, 255, 0.05);
    padding: 1rem;
    border-radius: 20px;
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    height: fit-content;
    position: sticky;
    top: 2rem;
}

.selector-label {
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.9em;
    writing-mode: vertical-rl;
    transform: none;
    text-align: center;
    padding: 1rem 0;
    font-weight: 500;
    letter-spacing: 2px;
}

.selector-buttons {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.number-btn {
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    color: rgba(255, 255, 255, 0.8);
    cursor: pointer;
    transition: all 0.3s;
    font-size: 0.9em;
    backdrop-filter: blur(5px);
    display: flex;
    align-items: center;
    justify-content: center;
}

.number-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateX(5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.number-btn.active {
    background: linear-gradient(45deg, #FF6B6B, #FF8E53);
    border: none;
    color: white;
    box-shadow: 0 5px 15px rgba(255, 107, 107, 0.3);
    transform: translateX(5px);
}

.slot-machine.rolling .slot-wrapper {
    animation: none;
}

.slot-item.changing {
    animation: itemChange 0.2s ease-in-out;
}

@keyframes itemChange {
    0% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(0.9);
        opacity: 0.5;
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* 响应式调整 */
@media (max-width: 1200px) {
    .slot-item {
        min-width: 140px;
        max-width: 180px;
    }
}

@media (max-width: 768px) {
    .slot-wrapper {
        gap: 10px;
        padding: 10px;
    }
    
    .slot-item {
        width: 120px;
        height: 160px;
    }
    
    .slot-item .avatar {
        width: 80px;
        height: 80px;
        font-size: 1.8em;
    }
    
    .slot-item .name {
        font-size: 1.2em;
    }
}

@media (max-width: 480px) {
    .slot-wrapper {
        gap: 8px;
        padding: 8px;
    }
    
    .slot-item {
        min-width: 100px;
        max-width: 140px;
        height: 140px;
    }
    
    .slot-item .avatar {
        width: 70px;
        height: 70px;
        font-size: 1.6em;
    }
    
    .slot-item .name {
        font-size: 1.2em;
    }
}

.winner-item {
    animation: winnerPop 0.8s ease-out;
    background: rgba(255, 215, 0, 0.15);
    border: 2px solid rgba(255, 215, 0, 0.3);
    box-shadow: 0 0 30px rgba(255, 215, 0, 0.2);
    transform-style: preserve-3d;
}

.winner-item .avatar {
    animation: winner-flip 1.8s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
    transform-style: preserve-3d;
}

.winner-item .avatar-front,
.winner-item .avatar-back {
    border: 4px solid rgba(255, 215, 0, 0.5);
    box-shadow: 0 8px 25px rgba(255, 215, 0, 0.3);
    background: linear-gradient(45deg, #FFD700, #FFA500);
}

.winner-item .avatar-back {
    background: linear-gradient(45deg, #FFA500, #FFD700);
}

.winner-item .name {
    animation: fadeIn 0.5s ease-out 0.8s both;
    text-shadow: 0 2px 10px rgba(255, 215, 0, 0.3);
    font-weight: bold;
}

@keyframes winnerPop {
    0% {
        transform: scale(0.8);
        opacity: 0;
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

@keyframes winner-flip {
    0% {
        transform: rotateY(0deg);
    }
    100% {
        transform: rotateY(360deg);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.selected-list {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

.selected-item {
    background: rgba(255, 255, 255, 0.9);
    border-radius: 15px;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    width: 150px;
    transition: all 0.3s;
}

.selected-item.placeholder {
    opacity: 0.5;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.2);
}

.selected-item .avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.8em;
    color: white;
    margin: 0;
    transition: all 0.3s;
}

.selected-item .name {
    font-size: 1.2em;
    color: #fff;
    font-weight: bold;
}

/* 头像墙样式 */
.avatar-wall {
    margin-top: auto;
    padding: 0.5rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 20px;
    backdrop-filter: blur(5px);
}

.avatar-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    padding: 15px;
    max-width: 1200px;
    margin: 0 auto;
}

.avatar-container .avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.1em;
    color: white;
    cursor: pointer;
    transition: all 0.3s;
    position: relative;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.avatar-container .avatar:hover {
    transform: translateY(-5px) scale(1.05);
}

.avatar-container .avatar.selected {
    animation: selected 1s infinite;
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.5);
}

@keyframes selected {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 0 20px rgba(255, 215, 0, 0.5);
    }
    50% {
        transform: scale(1.1);
        box-shadow: 0 0 30px rgba(255, 215, 0, 0.8);
    }
}

.rolling .selected-item {
    animation: cardRoll 0.3s infinite;
}

@keyframes cardRoll {
    0% {
        transform: translateY(0) scale(1);
    }
    50% {
        transform: translateY(-10px) scale(1.05);
    }
    100% {
        transform: translateY(0) scale(1);
    }
}

.selected-item.winner {
    animation: winner 0.8s ease-in-out;
    background: rgba(255, 215, 0, 0.2);
    border: 2px solid rgba(255, 215, 0, 0.5);
    box-shadow: 0 0 30px rgba(255, 215, 0, 0.3);
}

@keyframes winner {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
    }
}

.class-info {
    text-align: center;
    color: white;
    margin: 2rem 0;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.3);
}

.class-title {
    font-size: 1.5em;
    font-weight: bold;
}

.student-count {
    font-size: 1.1em;
    opacity: 0.9;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .container {
        padding: 1rem;
    }
    
    .title {
        font-size: 2em;
    }
    
    .lottery-box {
        padding: 1rem;
    }
    
    .selected-item {
        width: 120px;
        padding: 1rem;
    }
    
    .avatar-container {
        grid-template-columns: repeat(auto-fit, minmax(60px, 1fr));
        gap: 10px;
    }
    
    .avatar-container .avatar {
        width: 60px;
        height: 60px;
        font-size: 1.1em;
    }
}

@media (max-height: 700px) {
    .container {
        padding: 1rem;
    }
    
    .header {
        margin-bottom: 1rem;
    }
    
    .control-panel {
        margin-bottom: 1rem;
    }
    
    .lottery-stage {
        min-height: 150px;
    }
    
    .avatar-wall {
        margin-top: 1rem;
    }
}

.select-wrapper {
    position: relative;
    width: 200px;
}

.student-select {
    width: 100%;
    padding: 12px 20px;
    font-size: 1em;
    border: none;
    border-radius: 25px;
    appearance: none;
    background: linear-gradient(45deg, #4A90E2, #67B8F7);
    color: white;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.student-select:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.2);
}

.select-arrow {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: white;
    pointer-events: none;
}

.name-display {
    perspective: 1000px;
    margin: 2rem 0;
}

.name-card {
    background: rgba(255, 255, 255, 0.9);
    padding: 2rem;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    overflow: hidden;
}

.name-card.rolling {
    position: relative;
}

.name-card.rolling .roll-content {
    animation: rollUp 0.1s linear infinite;
}

.roll-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    transition: transform 0.3s;
}

.avatar-large {
    width: 100px;
    height: 100px;
    background: linear-gradient(45deg, #6B6BFF, #53A0FF);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 2.5em;
    color: white;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

#currentName {
    font-size: 2em;
    color: #2a5298;
    font-weight: bold;
}

.settings-icon {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
}

.icon-btn {
    background: none;
    border: none;
    font-size: 1.5em;
    color: white;
    cursor: pointer;
    transition: transform 0.3s;
    padding: 10px;
}

.icon-btn:hover {
    transform: rotate(90deg);
}

.custom-number {
    display: flex;
    gap: 5px;
}

.custom-number input {
    width: 100px;
    padding: 10px;
    border: none;
    border-radius: 25px;
    text-align: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.slot-machine {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: center;
}

/* 动画定义 */
@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

@keyframes rollUp {
    0% {
        transform: translateY(0);
    }
    100% {
        transform: translateY(-20px);
    }
}

/* 响应式设计 */
@media (max-width: 600px) {
    .title {
        font-size: 2em;
    }
    
    .roll-btn {
        padding: 12px 30px;
        font-size: 1em;
    }
    
    #currentName {
        font-size: 1.5em;
    }

    .avatar-large {
        width: 80px;
        height: 80px;
        font-size: 2em;
    }

    .avatar {
        width: 50px;
        height: 50px;
        font-size: 1em;
    }
}

.control-panel {
    margin-bottom: 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.custom-number {
    display: flex;
    gap: 5px;
}

.custom-number input {
    width: 100px;
    padding: 10px;
    border: none;
    border-radius: 25px;
    text-align: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.slot-machine {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: center;
}

/* 响应式设计更新 */
@media (max-width: 600px) {
    .number-selector {
        flex-direction: column;
        align-items: center;
    }

    .custom-number {
        width: 100%;
        justify-content: center;
    }

    .selected-item {
        min-width: 100px;
    }

    .selected-item .avatar {
        width: 60px;
        height: 60px;
    }
}

/* 模态框样式 */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    justify-content: center;
    align-items: center;
    z-index: 1000;
    backdrop-filter: blur(5px);
}

.modal-content {
    background: #fff;
    border-radius: 20px;
    width: 90%;
    max-width: 600px;
    height: 80vh;
    transform: scale(0.7);
    opacity: 0;
    transition: transform 0.3s ease-out, opacity 0.3s ease-out;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.modal.active {
    display: flex;
}

.modal.active .modal-content {
    transform: scale(1);
    opacity: 1;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.2rem 1.5rem;
    border-bottom: 1px solid rgba(0,0,0,0.08);
    position: sticky;
    top: 0;
    background: #fff;
    border-radius: 20px 20px 0 0;
    z-index: 2;
    contain: layout style;
}

.modal-header h2 {
    color: #333;
    font-size: 1.5em;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.modal-header .student-count {
    font-size: 0.7em;
    color: #666;
    font-weight: normal;
}

.modal-header .icon-btn {
    color: #333;
    font-size: 1.2em;
    padding: 8px;
    border-radius: 8px;
    transition: all 0.3s;
}

.modal-header .icon-btn:hover {
    background: rgba(0,0,0,0.1);
    transform: rotate(90deg);
}

.name-list {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    contain: paint layout;
    background: #fff;
}

.name-list-header {
    height: 8px;
    background: linear-gradient(to right, rgba(0,0,0,0.05), rgba(0,0,0,0.02));
    margin-bottom: 1rem;
    border-radius: 4px;
}

.name-list ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 8px;
    contain: layout style;
}

.name-list li {
    padding: 0.6rem 0.8rem;
    border-radius: 8px;
    background: #fff;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    border: 1px solid rgba(0,0,0,0.08);
    gap: 0.8rem;
    contain: layout style;
}

.name-list li:hover {
    transform: translateX(5px);
    background: #f8f9fa;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.name-list .student-info {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    flex: 1;
}

.name-list .student-avatar {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    display: flex;
    justify-content: center;
    align-items: center;
    color: white;
    font-weight: 500;
    flex-shrink: 0;
    font-size: 0.9em;
    contain: strict;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.name-list .student-name {
    font-size: 0.95em;
    color: #333;
}

.name-list .action-buttons {
    display: flex;
    gap: 0.5rem;
}

.name-list .action-btn {
    background: none;
    border: none;
    font-size: 1em;
    cursor: pointer;
    padding: 6px;
    border-radius: 6px;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
}

.name-list .edit-btn {
    color: #4A90E2;
}

.name-list .edit-btn:hover {
    background: rgba(74, 144, 226, 0.1);
    transform: translateY(-2px);
}

.name-list .delete-btn {
    color: #FF6B6B;
}

.name-list .delete-btn:hover {
    background: rgba(255, 107, 107, 0.1);
    transform: translateY(-2px);
}

.name-input {
    padding: 1.2rem 1.5rem;
    border-top: 1px solid rgba(0,0,0,0.08);
    display: flex;
    gap: 10px;
    position: sticky;
    bottom: 0;
    background: linear-gradient(to bottom, rgba(255,255,255,0.9), #fff);
    border-radius: 0 0 20px 20px;
    z-index: 2;
    contain: layout style;
}

.name-input input {
    flex: 1;
    padding: 0.8rem 1.2rem;
    border: 1px solid rgba(0,0,0,0.08);
    border-radius: 8px;
    font-size: 0.95em;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    background: #fff;
}

.name-input input:hover {
    border-color: rgba(74,144,226,0.3);
}

.name-input input:focus {
    border-color: #4A90E2;
    outline: none;
    box-shadow: 0 0 0 3px rgba(74,144,226,0.15);
}

.name-input .btn {
    background: #4A90E2;
    color: white;
    border: none;
    padding: 0.8rem 1.2rem;
    border-radius: 8px;
    font-size: 0.95em;
    cursor: pointer;
    transition: transform 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease;
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 500;
}

.name-input .btn:hover {
    background: #357ABD;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(74,144,226,0.25);
}

.name-input .btn:active {
    transform: translateY(0);
    box-shadow: 0 1px 4px rgba(74,144,226,0.2);
}

.name-input .btn i {
    font-size: 0.9em;
}

.action-btn {
    opacity: 0.7;
    transition: opacity 0.2s ease, transform 0.2s ease, background-color 0.2s ease;
}

.name-list li:hover .action-btn {
    opacity: 1;
}

.name-list .edit-btn:hover {
    background: rgba(74, 144, 226, 0.08);
    transform: translateY(-1px);
}

.name-list .delete-btn:hover {
    background: rgba(255, 107, 107, 0.08);
    transform: translateY(-1px);
}

.import-area {
    padding: 1rem;
}

.import-tip {
    color: #666;
    margin-bottom: 1rem;
    font-size: 0.9em;
}

#importText {
    width: 100%;
    min-height: 200px;
    padding: 1rem;
    border: 2px solid #eee;
    border-radius: 10px;
    font-size: 1em;
    line-height: 1.5;
    resize: vertical;
    transition: all 0.3s;
}

#importText:focus {
    border-color: #4A90E2;
    outline: none;
    box-shadow: 0 0 10px rgba(74,144,226,0.2);
}

.import-actions {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    margin-top: 1rem;
}

.btn-secondary {
    background: #6c757d !important;
}

.btn-secondary:hover {
    background: #5a6268 !important;
}

.btn-primary {
    background: #4A90E2 !important;
}

.btn-primary:hover {
    background: #357ABD !important;
}

@keyframes rollAnimation {
    0%, 100% {
        transform: translateY(0);
        filter: brightness(1);
    }
    50% {
        transform: translateY(-5px);
        filter: brightness(1.1);
    }
}

.slot-machine.rolling .slot-item {
    animation: rollAnimation 0.8s ease-in-out infinite;
    transition: all 0.3s ease;
}

.slot-machine.rolling .slot-item:nth-child(2) {
    animation-delay: 0.1s;
}

.slot-machine.rolling .slot-item:nth-child(3) {
    animation-delay: 0.2s;
}

.slot-machine.rolling .slot-item:nth-child(4) {
    animation-delay: 0.3s;
}

.slot-machine.rolling .slot-item:nth-child(5) {
    animation-delay: 0.4s;
}

.slot-item.placeholder-item {
    opacity: 0.8;
    background: rgba(255, 255, 255, 0.05);
    border: 2px dashed rgba(255, 255, 255, 0.2);
    transform: scale(0.95);
    width: 140px;
    height: 180px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 12px;
    border-radius: 15px;
}

.slot-item.placeholder-item .avatar {
    background: linear-gradient(45deg, #666, #999) !important;
    border: 2px solid rgba(255, 255, 255, 0.2);
    width: 90px;
    height: 90px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 2em;
    color: rgba(255, 255, 255, 0.8);
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.slot-item.placeholder-item .name {
    color: rgba(255, 255, 255, 0.6);
    font-size: 1.4em;
    text-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

/* 烟花效果 */
.fireworks-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 999;
}

.firework {
    position: absolute;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    transform: translate(0, 0);
    background-color: var(--color);
    box-shadow: 0 0 20px var(--color),
                0 0 40px var(--color),
                0 0 60px var(--color),
                0 0 80px var(--color);
}

.firework.rocket {
    width: 4px;
    height: 4px;
    animation: rocketUp 0.6s ease-out forwards;
}

@keyframes rocketUp {
    0% {
        transform: translate(var(--x), var(--y)) scale(1);
        opacity: 1;
    }
    100% {
        transform: translate(var(--x), var(--end-y)) scale(1);
        opacity: 0;
    }
}

@keyframes explode {
    0% {
        transform: translate(0, 0) scale(0.1);
        opacity: 1;
    }
    50% {
        opacity: 1;
    }
    100% {
        transform: translate(
            calc(var(--dx)),
            calc(var(--dy))
        ) scale(1);
        opacity: 0;
    }
}

.firework {
    animation: explode 1.5s ease-out forwards;
}

/* 控制按钮样式 */
.control-buttons {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
    display: flex;
    gap: 10px;
}

/* 抽取范围设置面板样式 */
.pool-list {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: #fff;
}

.pool-list-header {
    padding: 1rem;
    background: #fff;
    border-bottom: 1px solid rgba(0,0,0,0.08);
    position: sticky;
    top: 0;
    z-index: 1;
}

.student-grid {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    gap: 0.6rem;
    max-height: calc(100vh - 200px);
    align-content: start;
    grid-auto-rows: min-content;
}

.search-box {
    position: relative;
    width: 100%;
}

.search-box i {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #666;
}

.search-box input {
    width: 100%;
    padding: 10px 10px 10px 35px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 0.9em;
    transition: all 0.3s;
}

.search-box input:focus {
    border-color: #4A90E2;
    box-shadow: 0 0 0 3px rgba(74,144,226,0.1);
    outline: none;
}

.student-card {
    position: relative;
    background: #fff;
    border: 1px solid #eee;
    border-radius: 6px;
    padding: 0.5rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
    user-select: none;
    height: fit-content;
}

.student-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.student-card.selected {
    border-color: #4A90E2;
    background: rgba(74,144,226,0.05);
}

.student-card .avatar {
    width: 32px;
    height: 32px;
    margin: 0 auto 4px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9em;
    color: white;
    transition: transform 0.3s;
}

.student-card.selected .avatar {
    transform: scale(1.1);
}

.student-card .name {
    font-size: 0.8em;
    color: #333;
    margin-top: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.text-btn {
    background: none;
    border: none;
    color: #4A90E2;
    font-size: 0.9em;
    cursor: pointer;
    padding: 6px 12px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.3s;
}

.text-btn:hover {
    background: rgba(74,144,226,0.1);
}

.text-btn i {
    font-size: 1.1em;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .student-grid {
        grid-template-columns: repeat(auto-fill, minmax(70px, 1fr));
        gap: 0.6rem;
        padding: 0.6rem;
    }
    
    .student-card {
        padding: 0.5rem;
    }
    
    .student-card .avatar {
        width: 28px;
        height: 28px;
        font-size: 0.8em;
    }
} 